package com.module.app.emoji.adapter.holder;

import android.view.ViewGroup;
import android.widget.ImageView;

import androidx.databinding.ViewDataBinding;

import com.module.app.emoji.bean.Emoji;
import com.module.base.base.adapter.BaseViewHolder;
import com.module.app.R;

public class EmojiHolder extends BaseViewHolder<Emoji, ViewDataBinding> {

    ImageView iv_img;

    public EmojiHolder(ViewGroup parent) {
        super(parent, R.layout.app_item_emoji);
    }

    @Override
    public void initView() {
        super.initView();
        iv_img = itemView.findViewById(R.id.iv_img);
    }

    @Override
    protected void convert(Emoji bean, int position) {
        iv_img.setImageResource(bean.getIdRes());
    }
}
